﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DatabaseHelper
{
    /// <summary>
    /// PEvent class present a row with main fields in Events table
    /// </summary>
    public class PEvent
    {
        #region PROPERTIES
        /// <summary>
        /// Logged time
        /// </summary>
        public DateTime EventTime { get; set; }
        /// <summary>
        /// Description of event
        /// For example: Start/End of survey, Debris, Free span, CP stab, Damage,...
        /// </summary>
        public string Description { get; set; }
        /// <summary>
        /// General comment of event
        /// For example: Good condition, Anomaly,...
        /// </summary>
        public string GeneralComment { get; set; }
        /// <summary>
        /// Detailed comment of event
        /// For example: CP reading is -1050mV,...
        /// </summary>
        public string Comment { get; set; }
        /// <summary>
        /// Kilometer post of event at logged time
        /// </summary>
        public string KP { get; set; }
        /// <summary>
        /// Easting (~longitude) in local coordinate system of event at logged time
        /// </summary>
        public string Easting { get; set; }
        /// <summary>
        /// Cathodic protection reading value (in V or mV) of event at logged time
        /// </summary>
        public string Northing { get; set; }
        #endregion

        #region CONSTRUCTORS
        /// <summary>
        /// Default constructor
        /// <remarks>EventTime is assigned to DateTime.Now</remarks>
        /// </summary>
        public PEvent()
        {
            EventTime = DateTime.Now;
            Description = "";
            GeneralComment = "";
            Comment = "";
            KP = "";
            Easting = "";
            Northing = "";
        }

        /// <summary>
        /// Constructor without time
        /// </summary>
        /// <param name="des">Description</param>
        /// <param name="gen">General Comment</param>
        /// <param name="com">Comment</param>
        /// <param name="kp">KP</param>
        /// <param name="eas">Easting</param>
        /// <param name="nor">Northing</param>
        public PEvent(string des, string gen, string com, string kp, string eas, string nor)
            :this()
        {
            Description = des;
            GeneralComment = gen;
            Comment = com;
            KP = kp;
            Easting = eas;
            Northing = nor;
        }
        #endregion
    }
}
